package LeetCode.month03.day67;

/**
 * @author 16778
 * @date 2025/10/2 10:16
 * @description
 */
public class No3100 {
    public int maxBottlesDrunk(int numBottles, int numExchange) {
        int res = 0;
        int n = 0;
        while(numBottles>0){
            res+=numBottles;
            n+=numBottles;
            numBottles=0;
            while(n>=numExchange){
                numBottles++;
                n-=numExchange;
                numExchange++;
            }
        }
        return res;
    }
}
